package cn.cqnu.handler;


import cn.cqnu.domin.vo.ResponseResult;
import cn.cqnu.exception.ParamsException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ParamsExceptionHandler {

    @ExceptionHandler(ParamsException.class)
    public ResponseResult handler(ParamsException e) {

        e.printStackTrace();
        return ResponseResult.error(e.getCode(), e.getMessage());
    }

}
